<!--<?php
print <<<EOT
-->
<link rel="stylesheet" href="./plugin/index.css" />
<script charset="utf-8" src="./plugin/kindeditor.js"></script>
<script type="text/javascript">
KE.show({
	id : 'pinfo',
	cssPath : './index.css',
	afterCreate : function(id) {
		KE.event.ctrl(document, 13, function() {
			KE.sync(id);
			document.forms['form1'].submit();
		});
		KE.event.ctrl(KE.g[id].iframeDoc, 13, function() {
			KE.sync(id);
			document.forms['form1'].submit();
		});
	}
});

KE.show({
	id : 'pinfozh',
	cssPath : './index.css',
	afterCreate : function(id) {
		KE.event.ctrl(document, 13, function() {
			KE.sync(id);
			document.forms['form1'].submit();
		});
		KE.event.ctrl(KE.g[id].iframeDoc, 13, function() {
			KE.sync(id);
			document.forms['form1'].submit();
		});
	}
});

KE.show({
	id : 'pinforu',
	cssPath : './index.css',
	afterCreate : function(id) {
		KE.event.ctrl(document, 13, function() {
			KE.sync(id);
			document.forms['form1'].submit();
		});
		KE.event.ctrl(KE.g[id].iframeDoc, 13, function() {
			KE.sync(id);
			document.forms['form1'].submit();
		});
	}
});

</script>

<!--Content Start-->
<table width="95%" border="0" align="center">
  <tr> 
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td>
    
      <form action="p_product.php" method="post" name="form1" enctype="multipart/form-data">
      <table width="60%" align="left">
      <tr><td>
      <table width="60%" border="0" align="center">
        <tr> 
          <td align="right">
            <a href="p_product.php"><img src="../images/admin/bt_cancel.gif" border="0" /></a>
            <input type="image" src="../images/admin/bt_save.gif" width="76" height="22"  > 			
          </td>
        </tr>
      </table>
      </td></tr>
    
      <tr><td>
      <table width="95%" border="0" align="center">
        <tr> 
          <td align="right">&nbsp; </td>
        </tr>
        <tr> 
          <td>
            <table border="0" cellspacing="0" cellpadding="2">
              <tr valign="vtop"> 
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr valign="vtop"> 
                <td>Basic code :</td>
                <td>
                  <input type="text" class="text" name="bcode" value="">	
                </td>
              </tr>
              <tr valign="vtop"> 
                <td>Web code nr :</td>
                <td>
                  <input type="text" class="text" name="code" value="">	  
                  <input name="action" type="hidden" value="add">
                </td>
              </tr>
			  <tr valign="vtop"> 
                <td>Article # :</td>
                <td>
                  <input type="text" class="text" name="pcode" value="">
                </td>
              </tr>
              <tr valign="vtop"> 
                <td>Name :</td>
                <td><textarea class="text" name="name" cols="40" rows="2"  ></textarea></td>
              </tr>
			  <tr valign="vtop"> 
                <td>Name Chinese:</td>
                <td><textarea class="text" name="namezh" cols="40" rows="2"  ></textarea></td>
              </tr>	
			  <tr valign="vtop"> 
                <td>Name Russian:</td>
                <td><textarea class="text" name="nameru" cols="40" rows="2"  ></textarea></td>
              </tr>			  
              <tr valign="vtop"> 
                <td>Small Picture :</td>
                <td><input type="file" class="text" name="up_small_pic" size=50></td>
              </tr>
              <tr valign="vtop"> 
                <td>Picture :</td>
                <td><input type="file" class="text" name="up_pic" size=50></td>
              </tr>
              <tr valign="vtop"> 
                <td>Finish Shown :</td>
                <td><input type="text" class="text" name="finishshown" value=""><input type="hidden" class="text" name="finishshownzh" value=""></td>
              </tr>		
			   

				 
            <tr valign="vtop"> 
                <td>Fabric Choice :</td>
                <td><select class="select" name="fabric_choice">
                    <option value='0'>Select--</option>
{$fabrics}{$leathers}</td>
              </tr>
            <tr valign="vtop"> 
                <td>Fabric Shown :</td>
                <td><input type="text" class="text" name="fabricshown" value=""></td>
              </tr>		
			  <tr valign="vtop"> 
                <td>Fabric Shown Chinese :</td>
                <td><input type="text" class="text" name="fabricshownzh" value=""></td>
              </tr>		
			  <tr valign="vtop"> 
                <td>Fabric Shown Russian :</td>
                <td><input type="text" class="text" name="fabricshownru" value=""></td>
              </tr>	
              <tr valign="vtop"> 
                <td>Leather Shown :</td>
                <td><input type="text" class="text" name="leathershown" value=""></td>
              </tr>	
			  <tr valign="vtop"> 
                <td>Leather Shown Chinese:</td>
                <td><input type="text" class="text" name="leathershownzh" value=""></td>
              </tr>
			  <tr valign="vtop"> 
                <td>Leather Shown Russian:</td>
                <td><input type="text" class="text" name="leathershownru" value=""></td>
              </tr>
			  			   			  		
              <tr valign="vtop"> 
                <td>Marble Shown :</td>
                <td><input type="text" class="text" name="marbleshown" value=""></td>
              </tr>	
			   <tr valign="vtop"> 
                <td>Marble Shown Chinese:</td>
                <td><input type="text" class="text" name="marbleshownzh" value=""></td>
              </tr>	
			   <tr valign="vtop"> 
                <td>Marble Shown Russian:</td>
                <td><input type="text" class="text" name="marbleshownru" value=""></td>
              </tr>	
			   
			   <tr valign="vtop"> 
                <td>Accents Shown:</td>
                <td><input type="text" class="text" name="accentshown" value=""></td>
              </tr>	
			   <tr valign="vtop"> 
                <td>Price as Shown:</td>
                <td><input type="text" class="text" name="priceshown" value=""></td>
              </tr>	
			     
			  
			  							
              <tr valign="vtop"> 
                <td>Depth :</td>
                <td><input type="text" class="text" name="length" value=""> CM</td>
              </tr>
              <tr valign="vtop"> 
                <td>Width :</td>
                <td><input type="text" class="text" name="width" value=""> CM</td>
              </tr>
              <tr valign="vtop"> 
                <td>Height :</td>
                <td><input type="text" class="text" name="height" value=""> CM</td>
              </tr>
              
              <tr valign="vtop"> 
                <td>Depth :</td>
                <td><input type="text" class="text" name="length2" value=""> INCH</td>
              </tr>
              <tr valign="vtop"> 
                <td>Width :</td>
                <td><input type="text" class="text" name="width2" value=""> INCH</td>
              </tr>
              <tr valign="vtop"> 
                <td>Height :</td>
                <td><input type="text" class="text" name="height2" value=""> INCH</td>
              </tr>
              
              <tr valign="vtop"> 
                <td>Cbm :</td>
                <td><input type="text" class="text" name="cbm" value=""></td>
              </tr>
              <tr valign="vtop"> 
                <td>Cuft :</td>
                <td><input type="text" class="text" name="cuft" value=""></td>
              </tr>
              
              
              <tr valign="vtop"> 
                <td>Price : </td>
                <td>
                  <input type="text" class="text" name="price_1" size="10"  value=  > (USD) Mixed Container Price <br> 
                  <input type="text" class="text" name="price_2" size="10" value=  > (USD) Direct Container Price <br>
                  <input type="text" class="text" name="price_3" size="10" value=  > (HKD) Hong Kong Wholesaler Price <br> 
                </td>
              </tr>
              <tr valign="vtop"> 
                <td>Upcharge Deluxe Finish :</td>
                <td><input type="text" class="text" name="upcharge" value=""></td>
              </tr>
              <tr valign="vtop"> 
                <td>New Item :</td>
                <td>							  
                  <select class="select" name="new_flag"  >
                  <option value=1>Yes</option><option value=0 selected>No</option></select> 
                </td>
              </tr>              
              <tr valign="vtop"> 
                <td>Hidden in product :</td>
                <td>							  
                  <select class="select" name="hidden_flag"  >
                  <option value=1>Yes</option><option value=0 selected>No</option></select> 
                </td>
              </tr>
                <tr valign="vtop">
                    <td>Collection:</td>
                    <td><select class="select" name="selCollection">
                    <option value='0'>Select--</option>
<!--
EOT;
for($i=0; $i<count($aryCollection); $i++){
    print <<<EOT
-->
    <option value='{$aryCollection[$i]["id"]}'>{$aryCollection[$i]["name"]}</option>
 <!--
EOT;
} print <<<EOT
-->                        </select>
                    </td>
                </tr>
				
                <tr valign="vtop">
                    <td valign="top">Setting:
                    </td>
                    <td>           
						
					 <table width="100%" border="0" cellspacing="1" cellpadding="1" class="tb">
<!--
EOT;
$str="";
for($i=0; $i<count($arySetting); $i++){
  $ids="iput_".$i;
    $str.='<tr class="tbcontent1"><td><input type="checkbox" value='.$arySetting[$i]['id'].'  id="'.$ids.'"  name="selSetting[]" onchange="if ( this.checked==true){seetingseq_'.$i.'.disabled=false;} else {seetingseq_'.$i.'.disabled=true;}"><label     for="'.$ids.'">'.$arySetting[$i]["name"].'</label></td><td>
	<input id="seetingseq_'.$i.'" type="text" disabled="disabled" name="seeting_seq['.$i.']" size="3">
	</td></tr>'; 

} 

echo <<<EOT

-->	 
{$str}
 </table>
                    </td>
                </tr>
				
				
                <tr valign="vtop">
                    <td>Style / Period:
                    </td>
                    <td><select class="select" name="selStyle">
                    <option value='0'>Select--</option>
<!--
EOT;
for($i=0; $i<count($aryStyle); $i++){
    print <<<EOT
-->
    <option value='{$aryStyle[$i]["id"]}'>{$aryStyle[$i]["name"]}</option>
 <!--
EOT;
} print <<<EOT
-->        
                        </select>
                    </td>
                </tr>
			  
				 <tr valign="vtop"> 
                <td>Fabric :</td>
                <td><select id="fabric_flag" name="fabric_flag" >
				<option value="1">Yes</option>
				<option value="0">No</option></select>		
				</td>
              </tr>	
			  	
			  <tr valign="vtop"> 
                <td>Leather:</td>
                <td><select id="leather_flag" name="leather_flag" >
				<option value="1">Yes</option>
				<option value="0">No</option></select>	</td>
              </tr>	 
			  
                <tr valign="vtop">
                    <td>Finish categories
                    </td>
                    <td><select class="select" name="selFinishes">
                    <option value='0'>Select--</option>
<!--
EOT;
for($i=0; $i<count($aryFinishes); $i++){
    print <<<EOT
-->
    <option value='{$aryFinishes[$i]["id"]}'>{$aryFinishes[$i]["name"]}</option>
 <!--
EOT;
} print <<<EOT
-->     
                        </select>
                    </td>
                </tr>
                <tr valign="vtop">
                    <td>
                        Product info:</td>
                    <td>
                        <textarea style="width:500px;height:200px;visibility:hidden;" class="text" cols="40" name="pinfo" rows="4" id="pinfo"></textarea>
                    </td>
                </tr>
				   <tr valign="vtop">
                    <td>
                        Product info Chinese:</td>
                    <td>
                        <textarea style="width:500px;height:200px;visibility:hidden;" class="text" cols="40" name="pinfozh" rows="4" id="pinfozh"></textarea>
                    </td>
                </tr>
				   <tr valign="vtop">
                    <td>
                        Product info Russian:</td>
                    <td>
                        <textarea style="width:500px;height:200px;visibility:hidden;" class="text" cols="40" name="pinforu" rows="4" id="pinforu"></textarea>
                    </td>
                </tr>
              <tr valign="vtop"> 
                <td>Description :</td>
                <td><textarea class="text" name="comment" cols="40" rows="4"  ></textarea></td>
              </tr>
			  
			
              <tr valign="vtop"> 
                <td>Description Chinese :</td>
                <td><textarea class="text" name="commentzh" cols="40" rows="4"  ></textarea></td>
              </tr>
              <tr valign="vtop"> 
                <td>Description Russian :</td>
                <td><textarea class="text" name="commentru" cols="40" rows="4"  ></textarea></td>
              </tr>
              
              <tr valign="vtop"> 
                <td>Inventory :</td>
                <td>
                
                  <table width="100%" border="0" cellspacing="1" cellpadding="1" class="tb">
                    <tr class="tbheader">
                      <td align="left">Inventory</td>
                      <td align="center">Available Qty</td>
                      <td align="center">Special Price</td>
                    </tr>

<!--
EOT;
for($i=0; $i<$inventory_ary_num; $i++){
    // ΪHK warehouse Ҫ2sp
    if ($inventory_ary[$i]['type'] == 1) {
        $ovr_desc = 'Ovr ';
        $hk_sp = ' HK <input id="sp2_' . $inventory_ary[$i]['id'] . '" value="' . $inventory_sp2_ary[$inventory_ary[$i]['id']] . '" type="text" name="sp2_ary[' . $inventory_ary[$i]['id'] . ']" size="5"  disabled="disabled" />';
    } else {
        $ovr_desc = '';
        $hk_sp = '<input id="sp2_' . $inventory_ary[$i]['id'] . '" value="0" type="hidden" name="sp2_ary[' . $inventory_ary[$i]['id'] . ']"  disabled="disabled" />';
    }
    print <<<EOT
-->
                    
                    <tr class="tbcontent1">
                      <td align="left"><input type="checkbox" name="inventory_id[]" value="{$inventory_ary[$i]['id']}" onchange="if ( this.checked==true){qty_{$inventory_ary[$i]['id']}.disabled=false;sp_{$inventory_ary[$i]['id']}.disabled=false;sp2_{$inventory_ary[$i]['id']}.disabled=false;} else {qty_{$inventory_ary[$i]['id']}.disabled=true;sp_{$inventory_ary[$i]['id']}.disabled=true;sp2_{$inventory_ary[$i]['id']}.disabled=true;}" />{$inventory_ary[$i]['name']}</td>
                      <td align="center"><input id="qty_{$inventory_ary[$i]['id']}" type="text" name="qty_ary[{$inventory_ary[$i]['id']}]" size="3" disabled="disabled" /></td>
                      <td align="center">{$ovr_desc}<input id="sp_{$inventory_ary[$i]['id']}" type="text" name="sp_ary[{$inventory_ary[$i]['id']}]" size="8" disabled="disabled" />{$hk_sp}</td>
                    </tr>
                    
<!--
EOT;
} print <<<EOT
--> 

                  </table>
                    
                </td>
              </tr>
              <tr valign="vtop"> 
                <td>category :</td>
                <td>
                    <table width="100%" border="0" cellspacing="1" cellpadding="1" class="tb">
                    <tr class="tbheader">
                      <td align="left">Category/Sub Category</td>
                      <td align="center">Product Sequence</td>
                    </tr>
$out_cate
                    </table>
                </td>
              </tr>
              
              <tr> 
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
     </td></tr>
    
      <tr><td>
      <table width="60%" border="0" align="center">
        <tr> 
          <td align="right">
            <input type="image" src="../images/admin/bt_cancel.gif" width="78" height="23" onclick="Redirect('product_menu.php',1);return false;"> 
            <input type="image" src="../images/admin/bt_save.gif" width="76" height="22" > 
          </td>
        </tr>
      </table>
      </td></tr>
      </table>
      </form>

      <p>&nbsp;</p></td>
  </tr>
</table>
<!--Content End-->

<!--
EOT;
?>-->